﻿using System;

namespace Equinoxe.EZNFC.Library
{
    /// <summary>
    /// Class for declaration of NFC events delegates.
    /// </summary>
    /// <remarks></remarks>
    public class Events
    {
        /// <summary>
        /// Delegate for NFCTag events
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The <see cref="Equinoxe.EZNFC.Library.Windows.NFCTagEventArgs"/> instance containing the event data.</param>
        /// <remarks></remarks>
        public delegate void NFCTagEventHandler(object sender, NFCTagEventArgs e);
    }


    /// <summary>
    /// NFCEventArgs class
    /// </summary>
    /// <remarks></remarks>
    public class NFCTagEventArgs : EventArgs
    {
        /// <summary>
        /// Gets the NFC tag.
        /// </summary>
        /// <remarks></remarks>
        public INFCTag NFCTag { get; private set; }

        /// <summary>
        /// Gets the type of the tag.
        /// </summary>
        /// <remarks></remarks>
        public TagType TagType { get { return NFCTag != null ? NFCTag.TagInfo.TagType : TagType.Empty; } }

        /// <summary>
        /// Initializes a new instance of the <see cref="NFCTagEventArgs"/> class.
        /// </summary>
        /// <param name="nfctag">The nfctag.</param>
        /// <remarks></remarks>
        public NFCTagEventArgs(INFCTag nfctag)
        {
            NFCTag = nfctag;
        }

    }
}
